#include <process.h>
#include <iostream>

using namespace std;

typedef void *HANDLE;
#define IFINITE 0xFFFFFFFF

class Thread
{
public:
	void start(){
		hThread =(HANDLE)_beginthread(agent, 0, (void *)this);
	};
	virtual void run(){ 
		cout << "Base Thread" << endl;
	};
	HANDLE getThread(){ 
		return hThread;
	};
private:
	HANDLE hThread;
	   static void agent(void *p){
		   Thread *agt = (Thread *)p;
		   agt->run();
	   };
};
